﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace NewViews.Models
{
    public class AccountRepository :IAccountRepository
    {
        EShopDataEntities5 DBEntities = new EShopDataEntities5();
        public void SignUpDB(User userObj)
        {
           
            var UserAdd = DBEntities.Users;
            UserAdd.Add(userObj);
            DBEntities.SaveChanges();
        }
        public List<User> UserDBList()
       {
           
           var UserDBData = DBEntities.Users;
           var UserList = UserDBData.ToList();
           return UserList;
       }
        public List<Admin> AdminDBList()
       {
           
           var AdminDBData = DBEntities.Admins;
           var AdminList = AdminDBData.ToList();
           return AdminList;
       }
    }
}